using System;
using ValidationFramework;

namespace ExampleLibraryCSharp
{

	public class DateTimeConversionRuleAttributeExample
    {
        private static readonly RuntimeMethodHandle doSomethingHandle =
			typeof(DateTimeConversionRuleAttributeExample).GetMethod("ParseDateTime").MethodHandle;

        //Defined ErrorMessage
		[DateTimeConversionRule(ErrorMessage = "Invalid decimal format.")]
		public string DateTimeString
        {
            get;
            set;
        }

		public void ParseDateTime([DateTimeConversionRule] string decimalString)
        {
			ParameterValidationManager.ThrowException(this, doSomethingHandle, decimalString);
        }
    }
}